<?php
/**
 * Created by PhpStorm.
 * User: ruma
 * Date: 2019/1/18
 * Time: 8:50
 */

namespace app\common\model;


class AdminBaseModel extends BaseModel
{

    /**
     * config中要修改数据库返回类型为collection
     * @param $username
     * @return array
     */
    public function getUserInfoByUsername($username){
        $userInfo =$this->where('username','=',$username)->find();
        if (is_null($userInfo)){
            return [];
        }
        return $userInfo->toArray();
    }

}